package com.alex.space;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Alex
 * Created by Alex on 2018/4/9.
 */
@RestController
public class HelloController {

	@Value("${server.port}")
	String port;

	/**
	 * /hello?name=xxx
	 */
	@RequestMapping("/hello")
	public String home(@RequestParam String name) {
		return "hi " + name + ",i am from port:" + port;
	}

}
